﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XMFramework.Models
{
    [SugarTable("xmf_device_model")]//当和数据库名称不一样可以设置表别名 指定表明
    public class DeviceModel
    {
        //数据是自增需要加上IsIdentity 
        //数据库是主键需要加上IsPrimaryKey 
        //注意：要完全和数据库一致2个属性
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int id { get; set; }
        /// <summary>
        /// 设备类型
        /// </summary>
        public string deviceType { get; set; }
        /// <summary>
        /// 设备编号
        /// </summary>
        public string deviceCode { get; set; }
        /// <summary>
        /// 网关PN
        /// </summary>
        public string pn { get; set; }
        /// <summary>
        /// 创建日期
        /// </summary>
        public DateTime creationDate { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [SugarColumn(IsNullable = true)]//可以为NULL
        public string notes { get; set; }

    }
}
